@extends('base')
@section("style")
    <link rel="stylesheet" type="text/css" href="{{asset("/css/swiper.min.css")}}">
    <style>
        .swiper-slide img{ height: 18em;overflow: hidden;  }
        .titletext{ color: #000;text-overflow: ellipsis; }
        .titletext b{float: left;}
        .titletext em{overflow: hidden;text-overflow: ellipsis; display: -webkit-box;-webkit-line-clamp: 1;-webkit-box-orient: vertical;width: 17em; float: left; font-style: normal;}
        .text-left h1{font-size: 24px; width: 4em; font-weight: bold; color:#00C721;border-bottom: 3px solid #00C721;padding-bottom: 2px;}
    </style>
@endsection

@section('content')
    <div data-am-widget="slider" class="am-slider am-slider-a1" data-am-slider='{&quot;directionNav&quot;:false}'>
        <ul class="am-slides">
            <li>
                <img src="./image/ban6.jpg">
            </li>
            <li>
                <img src="./image/ban3.jpg">
            </li>
            <!--<li>
                <img src="./image/ban1.jpg">
            </li>-->
        </ul>
    </div>
    <div class="welcome" style="margin-bottom: 4em;">
        <div class="container">
            <div class="wel-img">
                <img src="image/welcome1.jpg" alt="image">
            </div>
            <div class="wel-text">
                <h3>浙江瑞昇环境工程有限公司</h3>
                <p>
                    {{$about->description}}
                </p>
                <a href="{{url('/about/'.$about->id)}}" class="hvr-shutter-in-horizontal">更多</a>
            </div>
        </div>
    </div>
    <section class="counter-section content-section">
        <div class="container">
            <div class="row">
                <div class="text-left">
                    <h1 style="font-size: 24px; font-weight: bold; color:#00C721;">新闻动态</h1>
                    <div class="news-content scroll-style">
                        <ul>
                            @foreach($news as $item)
                                <li data-content="article" data-href="{{url('/news/detail/'.$item->id)}}">
                                    <a class="titletext" href="{{url('/news/detail/'.$item->id)}}" style="color: #000;">
                                        <b>&raquo;</b>
                                        <em>{{$item->name}}</em>
                                        <span class="pull-right">{{date('Y-m-d', strtotime($item->created_at))}}</span>
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                        <p class="newsMore"><a href="{{url('/news')}}">更多>></a></p>
                    </div>
                </div>
                <div class="text-left">

                    <div class="swiper-container">
                        <div class="swiper-wrapper">
                            <div class="swiper-slide"><img src="{{asset('/image/news1.png')}}"/></div>
                            <div class="swiper-slide"><img src="{{asset('/image/news2.png')}}"/></div>
                            <div class="swiper-slide"><img src="{{asset('/image/news3.png')}}"/></div>
                            <div class="swiper-slide"><img src="{{asset('/image/news5.png')}}"/></div>
                            <div class="swiper-slide"><img src="{{asset('/image/news2.png')}}"/></div>
                            <div class="swiper-slide"><img src="{{asset('/image/news1.png')}}"/></div>
                        </div>
                        <!-- Add Pagination -->
                        <div class="swiper-pagination"></div>
                    </div>
                    @section("js")
                        <script src="{{asset('/js/swiper.min.js')}}"></script>
                        <script type="text/javascript">
                            var swiper = new Swiper('.swiper-container', {
                                pagination: '.swiper-pagination',
                                paginationClickable: true,
                                autoplay : 2000,
                            });
                        </script>
                    @endsection
                </div>
                <div class="text-left">
                    <h1 style="">工程案例</h1>

                    <div class="news-content scroll-style">
                        <ul>
                            @foreach($case as $item)
                                <li data-content="article" data-href="{{url('/case/'.$item->id)}}">
                                    <a class="titletext" href="{{url('/case/'.$item->id)}}">
                                        <b>&raquo;</b>
                                        <em> {{ $item->name }}</em>
                                        <span class="pull-right">{{date('Y-m-d', strtotime($item->created_at))}}</span>
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                        <p class="newsMore"><a href="{{url('/kindcas')}}">更多>></a></p>
                    </div>
                </div>
            </div>
        </div>
        <div style="clear: both;"></div>
    </section>


    <div class="jd-container">
        <div class="heading center heading-border heading_relative">
            <div class="center">
                <h1 class="mb-xl">我们的客户</h1>
                <p class="lead">我们所做的一切，都是为了保护我们的健康</p>
            </div>
            <ul class="Solution_Client">
                @foreach($link as $item)
                    <li>
                        <a href="{{json_decode($item->content)->url}}"><img src="{{asset("/img/".$item->type.'-'.json_decode($item->content)->pic.'/'.$items['link']['data']['pic']['value'])}}"></a>
                    </li>
                @endforeach
            </ul>
        </div>
    </div>
@stop